<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>gnome-url</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="GNOME Library Reference Manual">
<link rel="up" href="ch03.html" title="Displaying Help and External Info">
<link rel="prev" href="libgnome-gnome-help.html" title="gnome-help">
<link rel="next" href="ch04.html" title="Miscellaneous">
<meta name="generator" content="GTK-Doc V1.16 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="libgnome-gnome-help.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch03.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GNOME Library Reference Manual</th>
<td><a accesskey="n" href="ch04.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#libgnome-gnome-url.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#libgnome-gnome-url.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="libgnome-gnome-url"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libgnome-gnome-url.top_of_page"></a>gnome-url</span></h2>
<p>gnome-url — Display urls using appropriate viewers.</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="libgnome-gnome-url.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;libgnome/libgnome.h&gt;

enum                <a class="link" href="libgnome-gnome-url.html#GnomeURLError" title="enum GnomeURLError">GnomeURLError</a>;
#define             <a class="link" href="libgnome-gnome-url.html#GNOME-URL-ERROR:CAPS" title="GNOME_URL_ERROR">GNOME_URL_ERROR</a>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="libgnome-gnome-url.html#gnome-url-show" title="gnome_url_show ()">gnome_url_show</a>                      (<em class="parameter"><code>const <span class="type">char</span> *url</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="libgnome-gnome-url.html#gnome-url-show-with-env" title="gnome_url_show_with_env ()">gnome_url_show_with_env</a>             (<em class="parameter"><code>const <span class="type">char</span> *url</code></em>,
                                                         <em class="parameter"><code><span class="type">char</span> **envp</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="libgnome-gnome-url.description"></a><h2>Description</h2>
<p>
A GNOME user can configure which viewers they wish to use to view certain
protocols. Protocols can include http, ftp (where "view" might mean
"download"), ghelp, etc. This module provides a means for application to
display a url without having to worry about which viewer is going to ultimately
handle the job.
</p>
</div>
<div class="refsect1">
<a name="libgnome-gnome-url.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GnomeURLError"></a><h3>enum GnomeURLError</h3>
<pre class="programlisting">typedef enum {
  GNOME_URL_ERROR_PARSE,
  GNOME_URL_ERROR_LAUNCH,
  GNOME_URL_ERROR_URL,
  GNOME_URL_ERROR_NO_DEFAULT,
  GNOME_URL_ERROR_NOT_SUPPORTED,
  GNOME_URL_ERROR_VFS,
  GNOME_URL_ERROR_CANCELLED
} GnomeURLError;
</pre>
<p>
The errors that can be returned due to bad parameters being pass to
<a class="link" href="libgnome-gnome-url.html#gnome-url-show" title="gnome_url_show ()"><code class="function">gnome_url_show()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="GNOME-URL-ERROR-PARSE:CAPS"></a><span class="term"><code class="literal">GNOME_URL_ERROR_PARSE</code></span></p></td>
<td>The parsing of the handler failed.
</td>
</tr>
<tr>
<td><p><a name="GNOME-URL-ERROR-LAUNCH:CAPS"></a><span class="term"><code class="literal">GNOME_URL_ERROR_LAUNCH</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="GNOME-URL-ERROR-URL:CAPS"></a><span class="term"><code class="literal">GNOME_URL_ERROR_URL</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="GNOME-URL-ERROR-NO-DEFAULT:CAPS"></a><span class="term"><code class="literal">GNOME_URL_ERROR_NO_DEFAULT</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="GNOME-URL-ERROR-NOT-SUPPORTED:CAPS"></a><span class="term"><code class="literal">GNOME_URL_ERROR_NOT_SUPPORTED</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="GNOME-URL-ERROR-VFS:CAPS"></a><span class="term"><code class="literal">GNOME_URL_ERROR_VFS</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="GNOME-URL-ERROR-CANCELLED:CAPS"></a><span class="term"><code class="literal">GNOME_URL_ERROR_CANCELLED</code></span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GNOME-URL-ERROR:CAPS"></a><h3>GNOME_URL_ERROR</h3>
<pre class="programlisting">#define GNOME_URL_ERROR (gnome_url_error_quark ())
</pre>
<p>
The class (domain) of errors raised by this module.
</p>
</div>
<hr>
<div class="refsect2">
<a name="gnome-url-show"></a><h3>gnome_url_show ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gnome_url_show                      (<em class="parameter"><code>const <span class="type">char</span> *url</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Once the input has been converted into a fully qualified url this function
calls gnome_vfs_url_show. Any error codes returned by gnome-vfs will be wrapped
in the error parameter. All errors comes from the <a class="link" href="libgnome-gnome-url.html#GNOME-URL-ERROR:CAPS" title="GNOME_URL_ERROR"><code class="literal">GNOME_URL_ERROR</code></a>% domain.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>url</code></em> :</span></p></td>
<td>The url or path to display. The path can be relative to the current working
directory or the user's home directory. This function will convert it into a fully
qualified url using the gnome_url_get_from_input function.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Used to store any errors that result from trying to display the <em class="parameter"><code>url</code></em>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if everything went fine, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise (in which case
<em class="parameter"><code>error</code></em> will contain the actual error).</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-url-show-with-env"></a><h3>gnome_url_show_with_env ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gnome_url_show_with_env             (<em class="parameter"><code>const <span class="type">char</span> *url</code></em>,
                                                         <em class="parameter"><code><span class="type">char</span> **envp</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Like <a class="link" href="libgnome-gnome-url.html#gnome-url-show" title="gnome_url_show ()"><code class="function">gnome_url_show()</code></a>, but gnome_vfs_url_show_with_env
will be called with the given envirnoment.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>url</code></em> :</span></p></td>
<td>The url or path to display.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>envp</code></em> :</span></p></td>
<td>child's environment, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to inherit parent's.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Used to store any errors that result from trying to display the <em class="parameter"><code>url</code></em>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if everything went fine, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise (in which case
<em class="parameter"><code>error</code></em> will contain the actual error).</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.2</p>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.16</div>
</body>
</html>